package com.cd.learn.cdlearn.resttemplate;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;

@Controller
public class TestController {




    @GetMapping("send")
    @ResponseBody
    @AuditLog
    public void send() {
        TestContext.set("132");
    }

    @GetMapping("receive")
    @ResponseBody
    public void receive(HttpServletRequest request) {
        System.out.println("接收到请求！！！");
        Enumeration<String> woqu1 = request.getHeaders("woqu");
        String woqu = request.getHeader("woqu");
        System.out.println(woqu);
    }
}
